package com.train.mgr.modules.biz.dto.request;

import com.train.mgr.modules.system.dto.request.groups.Insert;
import com.train.mgr.modules.system.dto.request.groups.Update;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

@Data
public class CustReqDTO {

    @ApiModelProperty(name = "id", value = "企业客户ID，编辑时必填")
    @NotNull(message = "客户id必填", groups = {Update.class})
    private Long id;

    @ApiModelProperty(name = "companyName", value = "企业客户名称，新增/编辑时必填",required = true)
    @NotBlank(message = "企业名称必填", groups = {Insert.class, Update.class})
    @Length(max = 250, message = "企业名称必须在{max}个字以内", groups = {Insert.class, Update.class})
    private String companyName;

    @ApiModelProperty(name = "companyCode", value = "企业码，新增/编辑时必填",required = true)
    @NotBlank(message = "企业码必填", groups = {Insert.class, Update.class})
    @Length(min = 4 ,max = 8, message = "企业码请输入{min}-{max}位英文或数字", groups = {Insert.class, Update.class})
    private String companyCode;
//
//    @ApiModelProperty(name = "companyAddress", value = "企业地址")
//    @Length(max = 250, message = "企业客户地址必须在{max}个字以内", groups = {Insert.class, Update.class})
//    private String companyAddress;
//
//    @ApiModelProperty(name = "companyTel", value = "企业客户电话")
//    @Length(max = 20, message = "企业电话必须在{max}个字以内", groups = {Insert.class, Update.class})
//    private String companyTel;
//
//    @ApiModelProperty(name = "companyFax", value = "企业客户传真")
//    @Length(max = 10, message = "企业传真必须在{max}个字以内", groups = {Insert.class, Update.class})
//    private String companyFax;
//
//    @ApiModelProperty(name = "companyWebsite", value = "企业客户公司网址")
//    @Length(max = 250, message = "企业网址必须在{max}个字以内", groups = {Insert.class, Update.class})
//    private String companyWebsite;

    @ApiModelProperty(name = "companyLogo", value = "企业客户公司logo，传入相对路径，比如：/static/20240525/11.doc")
    private String companyLogo;

    /**
     * 菜单ID

    @ApiModelProperty(name = "menuIds", value = "功能权限对应的菜单ID列表")
    private List<Long> menuIds;
     */

    /**
     * 职能项目ID
     */
    @ApiModelProperty(name = "funIds", value = "功能权限职能项目ID(多个逗号隔开，如：'101,102,103')")
    private String funIds;


//    @ApiModelProperty(name = "username", value = "管理账号（新增客户时必填，不可更改）")
//    @NotBlank(message = "管理账号必填", groups = {Insert.class})
//    @Size(min = 11, max = 11, message = "管理账号必须11位数手机号码",groups = {Insert.class})
//    private String username;
//
//    @ApiModelProperty(name = "password", value = "账号密码（新增/修改客户时必填）")
//    @NotBlank(message = "账号密码必填", groups = {Insert.class, Update.class})
//    @Length(max = 20, message = "密码必须在{max}以内", groups = {Insert.class, Update.class})
//    private String password;
//
//    /**
//     * 姓名
//     */
//    @ApiModelProperty(name = "nickName", value = "姓名")
//    @NotBlank(message = "姓名必填", groups = {Insert.class, Update.class})
//    @Length(max = 20, message = "姓名必须在{max}以内", groups = {Insert.class, Update.class})
//    private String nickName;
//    /**
//     * 部门名称
//     */
//    @ApiModelProperty(name = "deptName", value = "部门名称（手写）")
//    @NotBlank(message = "部门名称必填", groups = {Insert.class, Update.class})
//    @Length(max = 20, message = "部门名称必须在{max}以内", groups = {Insert.class, Update.class})
//    private String deptName;

    /**
     * 使用期限（0-永久，1-截止时间）
     */
    @ApiModelProperty(name = "useLimit", value = "使用期限（0-永久，1-截止时间）",required = true)
    private String useLimit;
    /**
     * 截止时间
     */
    @ApiModelProperty(name = "deadlineTime", value = "截止时间的具体值（如：2024-05-20）")
    private String deadlineTime;
    /**
     * 状态：1禁用、0启用
     */
    @ApiModelProperty(name = "enabled", value = "状态：1禁用、0启用",required = true)
    @NotNull(message = "状态必填", groups = {Insert.class, Update.class})
    private Integer enabled;


    @ApiModelProperty(name = "authCount", value = "授权人数（0-无限制）",required = true)
    @NotNull(message = "授权人数必填", groups = {Insert.class, Update.class})
    private Integer authCount;

    @ApiModelProperty(name = "companySysName", value = "系统名称",required = true)
    @NotNull(message = "系统名称必填", groups = {Insert.class, Update.class})
    private String companySysName;

}
